/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package cz.muni.fi.pa036is.entity;

import java.sql.Timestamp;

/**
 *
 * @author Kuba
 */
public class Admission {

    private Long id;     
    private Long personId;
    private Long seasonId;
    private Timestamp date;

    public Admission() {
    }
    
    public Admission(Long personId, Long seasonId, Timestamp date) {
        this.personId = personId;
        this.seasonId = seasonId;
        this.date = date;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getPersonId() {
        return personId;
    }

    public void setPersonId(Long personId) {
        this.personId = personId;
    }

    public Long getSeasonId() {
        return seasonId;
    }

    public void setSeasonId(Long seasonId) {
        this.seasonId = seasonId;
    }

    public Timestamp getDate() {
        return date;
    }

    public void setDate(Timestamp date) {
        this.date = date;
    }

    @Override
    public int hashCode() {
        int hash = 3;
        hash = 83 * hash + (this.personId != null ? this.personId.hashCode() : 0);
        hash = 83 * hash + (this.seasonId != null ? this.seasonId.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final Admission other = (Admission) obj;
        if (this.personId != other.personId && (this.personId == null || !this.personId.equals(other.personId))) {
            return false;
        }
        if (this.seasonId != other.seasonId && (this.seasonId == null || !this.seasonId.equals(other.seasonId))) {
            return false;
        }
        return true;
    }
}
